﻿Imports System.IO

Partial Public Class ctlCargaArchivo
    Inherits UserControl

    Private strContenido As String = String.Empty

    Public Sub New()
        InitializeComponent()
    End Sub

    Private Sub btnSelect_Click(sender As Object, e As System.Windows.RoutedEventArgs) Handles btnSelect.Click
        Dim odlg As New OpenFileDialog
        odlg.Filter = "Text files|*.txt"
        odlg.Multiselect = False
        If CBool(odlg.ShowDialog()) Then
            Dim reader As New StreamReader(odlg.File.OpenRead())
            'While (reader.EndOfStream)
            'strContenido = reader.ReadToEnd()
            'End While
            txtTexto.Text = reader.ReadToEnd()
            reader.Close()
        End If

    End Sub
End Class
